import Vue from 'vue'

import 'normalize.css/normalize.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import App from './App'
import router from './router'
import store from './store'
Vue.config.productionTip = false
Vue.use(ElementUI)

import '@/styles/index.scss' // 引入全局样式
import '@/icons'
import '@/permission'

new Vue({
  beforeCreate() {
    // 创建全局事件总线
    // 因为组件实例的原型继承自Vue实例对象的原型，所以在vm的原型中添加Vue实例对象 
    Vue.prototype.$bus = this;
  },
  render: h => h(App),
  router,
  store
}).$mount('#app')
